home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 419_01 / odmg10 / lib / odmg / Odmg.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-02-27  |  1.2 KB  |  65 lines

  1. /*******************************<+>***************************
  2.  **                             DTA
  3.  *************************************************************
  4.  **
  5.  **  $Id: Odmg.h,v 1.5 1994/02/24 05:14:46 dta Exp $
  6.  **
  7.  **  $Source: /cvs/lib/odmg/Odmg.h,v $
  8.  **
  9.  **  What @(#):
  10.  **
  11.  **  Author: Dale T. Anderson
  12.  **
  13.  *******************************<+>***************************/
  14.  
  15. #ifndef _Odmg_h
  16. #define _Odmg_h
  17.  
  18. #include <Odmg/Ref.h>
  19.  
  20. class CPobject
  21. {
  22.     public:
  23.  
  24.     mark_modified ();
  25. };
  26.  
  27. enum lock_type {
  28.     read_lock,
  29.     write_lock,
  30.     default_lock,
  31. };
  32.  
  33. class CTransaction
  34. {
  35.     public:
  36.     CTransaction ();
  37.     ~CTransaction ();
  38.     void start ();
  39.     void commit ();
  40.     void abort ();
  41.     void checkpoint ();
  42. };
  43.  
  44. enum AccessStatus {
  45.     NotOpen,
  46.     ReadWrite,
  47.     ReadOnly,
  48.     Exclusive
  49. };
  50.  
  51. class CDatabase
  52. {
  53.     public:
  54.  
  55.     open (const char *database_name, AccessStatus status = ReadWrite);
  56.     close ();
  57.     //delete ();
  58.     void name (const Ref<CPobject> theObject, const char *theName);
  59.     const char *name (Ref<CPobject> theObject);
  60.     void rename (const char *oldName, const char *newName);
  61.     void lookup (const Ref<CPobject> &o, const char *name, lock_type lock = default_lock);
  62. };
  63.  
  64. #endif
  65.